import time

from httprunner import __version__


def get_httprunner_version():
    return __version__


def sum_two(m, n):
    return m + n


def sleep(n_secs):
    time.sleep(n_secs)


def faker_name():
    import faker
    faker1 = faker.Faker(locale="zh_cn")
    return faker1.name()
print(faker_name())

def id1():
    import requests
    res = requests.post("http://60.205.190.66:8899/adminapi/login", json={"account": "admin", "pwd": "123456", "imgcode": "a"})
    token = "Bearer " + res.json()['data']['token']
    res_search = requests.get("http://60.205.190.66:8899/adminapi/app/wechat/speechcraft?page=1&limit=15&cate_id=",
                           headers={"Authori-zation": token})
    assert res_search.status_code == 200
    assert res_search.json()['msg'] == 'ok'
    return res_search.json()['data']['list'][-1]['id']
print(id1())
